FM Export Cleaner is a FreeWare drag & drop utility that makes FileMaker Pro® text exports more readable so you don't have to do any finds & replaces in a word processor.
Before: here's a FileMaker Pro tab-separated text export (of six fields from two records) before using FM Export Cleaner:
Samuel Herschbein 5847 NE 75th #218 Seattle, WA 98115 Home: 206-524-3109 Fax: 206-524-3109 E-Mail: CyborgSam@aol.com
Samuel Herschbein University of Washington Box 351750 Seattle, WA 98195-1750 Work: 206-616-8646 Fax: 206-543-3778 E-Mail: sam@cheme.washington.edu
After: the same file after using FM Export Cleaner:
Samuel Herschbein
5847 NE 75th #218
Seattle, WA 98115
Home: 206-524-3109
Fax: 206-524-3109
E-Mail: CyborgSam@aol.com
Samuel Herschbein
University of Washington
Box 351750
Seattle, WA 98195-1750
Work: 206-616-8646
Fax: 206-543-3778
E-Mail: sam@cheme.washington.edu
Table of Contents:
How to Use It
Why is it needed and what does it do?
FileMaker Scripting for automatic operation & an example
Contacting the author
Version History
Legalities
How to Use It
To use FM Export Cleaner, drop a Tab-Separated Text export file created by FileMaker Pro onto FM Export Cleaner's icon. The file's text will be converted to a more readable format. Warning: the contents of the file are changed without user interaction.
FM Export Cleaner can also be double-clicked and then operated using its File menu. Limited balloon help is available. FM Export Cleaner is Apple Event aware and works with FileMaker Pro's scripting.
Why is it needed and what does it do?
FileMaker Pro exports tab-separated text files using the following format: Records are separated by returns. Fields within a record are separated by horizontal tabs (the tab key's character). Any returns present within a field are converted to vertical tabs. A vertical tab is an “unprintable” character not found on the keyboard.
This format is easy for other applications like spreadsheets and databases to understand. For printed directories, page layout applications, etc., this format looks weird and is hard to work with. At least three find & replace steps are needed to change this format to readable text, a tedious and error prone process.
FM Export Cleaner converts the format for you. A text file's returns are converted to two consecutive returns, so that records are separated by blank lines. Horizontal tabs are converted to returns, so that each field is placed on a separate line. Vertical tabs are converted to returns, so that fields that have returns in FileMaker again have them in the text file. This format looks much better and is easier to work with in word processors.
FileMaker Scripting for automatic operation:
You can use FileMaker's scripting to run FM Export Cleaner. Below is an example of setting up a script that exports using the same file name each time. Follow the steps carefully…
First Step: Export some data once
• Drag FileMaker's File menu down to Import/Export and then over to Export Records…
• Set the Type: popup menu to Tab-Separated Text.
• Specify a file name that makes sense and can be overwritten (e.g. My FM Text Export) and then click the Save button. If asked to replace an existing file: you should know what to do………
• In the dialog box that appears, put the fields you want to export in the order you want in the right column. In my database I selected a single calculation field named DirectoryInfo.
• Check the Don't format output radio button.
• Click the Export button.
Second Step: Create the Script
• The only two steps discussed here are the Export Records and the Send Apple Event, add any other steps you need.
• Create a script, then click the Clear All button.
• In the Available Steps list, double-click the Export Records item.
• Check the Restore export order and the Perform without dialog checkboxes.
• Click the Specify File… button.
• In the dialog box that appears, set the Type: popup menu to Tab-Separated Text.
• Type in the same file name that you saved in the first step above.
• Click the Save button, when asked to “Replace existing…”, click the Replace button.
• In the Available Steps list, double-click the Send Apple Event item.
• Click the Specify button.
• Click the Specify Application button.
• Navigate the file dialog box to where the FM Export Cleaner application resides, then double-click its icon/name.
• Change the popup menu so it says: Send the Open Document event with:
• Click the Document radio button.
• Click the Specify File… button.
• In the dialog box that appears, click on the file's name that you saved above, then click the Open button.
• Check the Bring target application to foreground checkbox (optional, my preference).
• Check the Wait for event completion before continuing checkbox (optional, my preference).
• Click OK, click OK, then click Done.
If you get any errors, check to make sure you did each step correctly.
If FM Export Cleaner hangs with a -1701 error, use -option -esc to force it to quit, no harm will be done to either the text file or FM Export Cleaner. A -1701 error means a mistake was made in the Send Apple Event steps.
FM Export Cleaner is FreeWare. FM Export Cleaner may be freely distributed, but you cannot charge for it (other than actual media costs). If you distribute FM Export Cleaner, you MUST include this ReadMe file. Failure to obey these restrictions will result in bad karma and you'll owe me a big box of Godiva® chocolates.
As if you need to be told: FileMaker Pro® is a registered trademark of Claris Inc. CodeWarrior® is a registered trademark of Metrowerks. Microsoft Word® is a registered trademark of Microsoft.